package ${package}.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.IdType;
import java.io.Serializable;
import java.util.Date;
/**
 * ${columnName!}
 * @author ${author}
 * @since ${date}
 */
@TableName("${table_name}")
public class ${TableName}Entity implements Serializable {

    private static final long serialVersionUID = 1L;
<#-- ----------  BEGIN 字段循环遍历  ---------->

<#list  columns as field>
    <#if field.isPk=="1">
    @TableId(value = "${field.column_name!}", type = IdType.ID_WORKER_STR)
        <#else>
    @TableField("${field.column_name}")
    </#if>
    private ${field.javaType} ${field.columnName};
</#list>
<#------------  END 字段循环遍历  ---------->

    <#list columns as field>
        <#if field.javaType == "boolean">
            <#assign getprefix="is"/>
        <#else>
            <#assign getprefix="get"/>
        </#if>
    public ${field.javaType} ${getprefix}${field.ColumnName}() {
        return ${field.columnName};
    }

    public void set${field.ColumnName}(${field.javaType} ${field.columnName}) {
        this.${field.columnName} = ${field.columnName};
    }
    </#list>

    @Override
    public String toString() {
        return "${TableName}{" +
    <#list columns as field>
        <#if field_index==0>
            "${field.columnName}=" + ${field.columnName} +
        <#else>
            ", ${field.columnName}=" + ${field.columnName} +
        </#if>
    </#list>
        "}";
    }
}
